/***********************************************************************
    filename:   DaterRepeating.h
    created:    19/5/2012
    author:     4Ys

    purpose:    Defines abstract base class for Repeating objects.
*************************************************************************/
#ifndef _DaterRepeating_h_
#define _DaterRepeating_h_

#include "DaterTime.h"

#include <string>

namespace Dater
{
	/*!
	\brief
		A class attached to the Event object represent the repeat of the event.
	*/
	class Repeating
	{
	public:
		/*!
		\brief
			Constructor for Repeating class.
		*/
		Repeating(int repeatInterval, std::string repeatUnit, Time repeatEndTime) :
		  _repeatInterval(repeatInterval), _repeatUnit(repeatUnit), _repeatEndTime(repeatEndTime){}

		/*!
		\brief
			a function to set some values.
		*/
		void setRepeatUnit(std::string repeatUnit){ _repeatUnit = repeatUnit;}
		
		/*!
		\brief
			a function to set some values.
		*/
		void setRepeatEndTime(Time repeatEndTime){_repeatEndTime = repeatEndTime;}
		
		/*!
		\brief
			a function to set some values.
		*/
		void setRepeatInterval(int repeatInterval){_repeatInterval = repeatInterval;}

		/*!
		\brief
			a function to get some values.
		*/
		std::string getRepeatUnit(){return _repeatUnit;}
		
		/*!
		\brief
			a function to get some values.
		*/
		Time getRepeatEndTime(){return _repeatEndTime;}
		
		/*!
		\brief
			a function to get some values.
		*/
		int getRepeatInterval(){return _repeatInterval;}

	private:
		int _repeatInterval;
		std::string _repeatUnit;
		Time _repeatEndTime;
	};
}

#endif